package smashedapples.events
{
	public class StructEvent extends AppEvent
	{

		public static const ADD 	: String = "add";
		public static const MOVE 	: String = "move";
		public static const REFRESH : String = "refresh";
		public static const REPLACE : String = "replace";
		public static const UPDATE 	: String = "update";
		
	
		public function StructEvent( type:String, location:int = -1, oldLocation:int = -1, items:Array = null, 
                                     bubbles:Boolean=true, cancelable:Boolean=false)
		{
			super(type, args, bubbles, cancelable);
        	this.location = location;
       	 	this.oldLocation = oldLocation;
        	this.items = items ? items : [];
		}
		
		public var location 	: int = -1;
		public var oldLocation 	: int = -1;
		public var items 		: Array = [];
   		
   		public function get item():Object
   		{
   			return items[0];
   		}
   		
			
	}
}